const state = {
	pubIsShow: null,
	pubStatus: true // 默认播放
}

const mutations = {
	SET_ISSHOW: (state, data) => {
		state.pubIsShow = data
	},
	SET_PLAYSTATUS: (state, data) => {
		state.pubStatus = data
	}
}

const actions = {
	// 是否在播放页面
	changeShow({ commit }, data) {
		return new Promise((resolve, reject) => {
			commit('SET_ISSHOW', data)
		})
	},
	// 当前播放状态
	changePlayStatus({ commit }, data) {
		return new Promise((resolve, reject) => {
			commit('SET_PLAYSTATUS', data)
		})
	}
}

export default {
	namespaced: true,
	state,
	mutations,
	actions
}
